xml/PSTANSS.Types.ps1xml
<?xml version="1.0" encoding="utf-8"?>
<Types> <!-- TANSS.Ticket --> <Type> <Name>Deserialized.TANSS.Ticket</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.Ticket </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.Ticket</Name> <Members> <ScriptProperty> <Name>CompanyId</Name> <GetScriptBlock> $this.BaseObject.companyId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Company</Name> <GetScriptBlock> [TANSS.Lookup]::Companies["$($this.BaseObject.companyId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Title</Name> <GetScriptBlock> $this.BaseObject.title </GetScriptBlock> <SetScriptBlock> $this.BaseObject.title = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Description</Name> <GetScriptBlock> $this.BaseObject.content </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ClientId</Name> <GetScriptBlock> $this.BaseObject.remitterId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Client</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.remitterId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ExternalTicketId</Name> <GetScriptBlock> $this.BaseObject.extTicketId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DateCreated</Name> <GetScriptBlock> [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.creationDate).ToLocalTime() </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeIdAssigned</Name> <GetScriptBlock> $this.BaseObject.assignedToEmployeeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeAssigned</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.assignedToEmployeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DepartmentId</Name> <GetScriptBlock> $this.BaseObject.assignedToDepartmentId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Department</Name> <GetScriptBlock> [TANSS.Lookup]::Departments["$($this.BaseObject.assignedToDepartmentId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>StatusId</Name> <GetScriptBlock> $this.BaseObject.statusId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Status</Name> <GetScriptBlock> [TANSS.Lookup]::TicketStates["$($this.BaseObject.statusId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>LinkTypeId</Name> <GetScriptBlock> $this.BaseObject.linkTypeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>LinkType</Name> <GetScriptBlock> [TANSS.Lookup]::LinkTypes["$($this.BaseObject.linkTypeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DateDeadline</Name> <GetScriptBlock> if($this.BaseObject.deadlineDate -gt 0) { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.deadlineDate).ToLocalTime() } else { $null } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsProject</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.project ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ProjectId</Name> <GetScriptBlock> $this.BaseObject.projectId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeIdCreator</Name> <GetScriptBlock> $this.BaseObject.createdEmployeeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeCreator</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.createdEmployeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>TypeId</Name> <GetScriptBlock> $this.BaseObject.typeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Type</Name> <GetScriptBlock> [TANSS.Lookup]::TicketTypes["$($this.BaseObject.typeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsRepairTicket</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.repair ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DateReminder</Name> <GetScriptBlock> if($this.BaseObject.reminder -gt 0) { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.reminder).ToLocalTime() } else { $null } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ResponseTime</Name> <GetScriptBlock> $this.BaseObject.reactionHours </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DateDueDate</Name> <GetScriptBlock> if($this.BaseObject.dueDate -gt 0) { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.dueDate).ToLocalTime() } else { $null } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DateResubmission</Name> <GetScriptBlock> if($this.BaseObject.resubmissionDate -gt 0) { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.resubmissionDate).ToLocalTime() } else { $null } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>resubmissionText</Name> <GetScriptBlock> $this.BaseObject.resubmissionText </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>PhaseId</Name> <GetScriptBlock> $this.BaseObject.phaseId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Phase</Name> <GetScriptBlock> [TANSS.Lookup]::Phases["$($this.BaseObject.phaseId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EstimatedMinutes</Name> <GetScriptBlock> $this.BaseObject.estimatedMinutes </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>TicketAdminFlag</Name> <GetScriptBlock> $this.BaseObject.localTicketAdminFlag </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>OrderNumber</Name> <GetScriptBlock> $this.BaseObject.orderNumber </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeTicketAdminId</Name> <GetScriptBlock> $this.BaseObject.localTicketAdminEmployeeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeTicketAdmin</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.localTicketAdminEmployeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ContractId</Name> <GetScriptBlock> $this.BaseObject.contractId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Contract</Name> <GetScriptBlock> [TANSS.Lookup]::Contracts["$($this.BaseObject.contractId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DateLastChange</Name> <GetScriptBlock> if($this.BaseObject.lastStateChangeDate -gt 0) { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.lastStateChangeDate).ToLocalTime() } else { $null } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeelastStateChangeId</Name> <GetScriptBlock> $this.BaseObject.lastStateChangeEmployeeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeelastStateChange</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.lastStateChangeEmployeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DateModified</Name> <GetScriptBlock> if($this.BaseObject.modifiedTime -gt 0) { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.modifiedTime).ToLocalTime() } else { $null } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeModifiedId</Name> <GetScriptBlock> $this.BaseObject.modifiedBy </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeModified</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.modifiedBy)"] </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TicketPreview --> <Type> <Name>Deserialized.TANSS.TicketPreview</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TicketPreview </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TicketPreview</Name> <Members> <ScriptProperty> <Name>CompanyId</Name> <GetScriptBlock> $this.BaseObject.companyId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Company</Name> <GetScriptBlock> [TANSS.Lookup]::Companies["$($this.BaseObject.companyId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Title</Name> <GetScriptBlock> $this.BaseObject.title </GetScriptBlock> <SetScriptBlock> $this.BaseObject.title = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Description</Name> <GetScriptBlock> $this.BaseObject.content </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ExternalTicketId</Name> <GetScriptBlock> $this.BaseObject.extTicketId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeIdAssigned</Name> <GetScriptBlock> $this.BaseObject.assignedToEmployeeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeAssigned</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.assignedToEmployeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>StatusId</Name> <GetScriptBlock> $this.BaseObject.statusId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Status</Name> <GetScriptBlock> [TANSS.Lookup]::TicketStates["$($this.BaseObject.statusId)"] </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.Company --> <Type> <Name>Deserialized.TANSS.Company</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.Company </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.Company</Name> <Members> <ScriptProperty> <Name>CompanyNumber</Name> <GetScriptBlock> $this.BaseObject.displayId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Name</Name> <GetScriptBlock> $this.BaseObject.name </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Street</Name> <GetScriptBlock> $this.BaseObject.street </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>PostCode</Name> <GetScriptBlock> $this.BaseObject.postCode </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>City</Name> <GetScriptBlock> $this.BaseObject.city </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Country</Name> <GetScriptBlock> $this.BaseObject.country </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Phone</Name> <GetScriptBlock> $this.BaseObject.phoneNumber </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Fax</Name> <GetScriptBlock> $this.BaseObject.faxNumber </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Email</Name> <GetScriptBlock> $this.BaseObject.email </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Website</Name> <GetScriptBlock> $this.BaseObject.website </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsActive</Name> <GetScriptBlock> -not [bool]::Parse( $this.BaseObject.inactive ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsLocked</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.Lockout ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CentralType</Name> <GetScriptBlock> $this.BaseObject.centralType </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsPrivateCustomer</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.personalCustomer ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Mobile</Name> <GetScriptBlock> $this.BaseObject.mobileNumber </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>PrivateNumber</Name> <GetScriptBlock> $this.BaseObject.privateNumber </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CompanyType</Name> <GetScriptBlock> if($this.BaseObject.types) { foreach ($typeItem in $this.BaseObject.types) { return [TANSS.CompanyType]@{ Id = $typeItem.Id Name = $typeItem.Name CategoryId = $typeItem.CategoryId CategoryName = $typeItem.CategoryName Icon = $typeItem.Icon IsHidden = [bool]::Parse( $typeItem.hidden ) } } } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CallBack</Name> <GetScriptBlock> $this.BaseObject.anticipatedCallbacks </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.EmployeeSearched --> <Type> <Name>Deserialized.TANSS.EmployeeSearched</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.EmployeeSearched </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.EmployeeSearched</Name> <Members> <ScriptProperty> <Name>Name</Name> <GetScriptBlock> $this.BaseObject.name </GetScriptBlock> <SetScriptBlock> $this.BaseObject.name = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Firstname</Name> <GetScriptBlock> $this.BaseObject.firstname </GetScriptBlock> <SetScriptBlock> $this.BaseObject.firstName = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Lastname</Name> <GetScriptBlock> $this.BaseObject.lastname </GetScriptBlock> <SetScriptBlock> $this.BaseObject.lastName = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Salutationid</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.salutationId ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.salutationId = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Departmentid</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.departmentId ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.departmentId = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Department</Name> <GetScriptBlock> [TANSS.Lookup]::Departments["$($this.BaseObject.departmentId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Role</Name> <GetScriptBlock> $this.BaseObject.role </GetScriptBlock> <SetScriptBlock> $this.BaseObject.role = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Phone</Name> <GetScriptBlock> $this.BaseObject.phoneNr </GetScriptBlock> <SetScriptBlock> $this.BaseObject.phoneNr = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Phone2</Name> <GetScriptBlock> $this.BaseObject.phoneNr2 </GetScriptBlock> <SetScriptBlock> $this.BaseObject.phoneNr2 = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Email</Name> <GetScriptBlock> $this.BaseObject.email </GetScriptBlock> <SetScriptBlock> $this.BaseObject.email = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Mobile</Name> <GetScriptBlock> $this.BaseObject.mobileNr </GetScriptBlock> <SetScriptBlock> $this.BaseObject.mobileNr = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Mobile2</Name> <GetScriptBlock> $this.BaseObject.mobileNr2 </GetScriptBlock> <SetScriptBlock> $this.BaseObject.mobileNr2 = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>PrivateNumber</Name> <GetScriptBlock> $this.BaseObject.privateNr </GetScriptBlock> <SetScriptBlock> $this.BaseObject.privateNr = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsActive</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.active ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.active = "$($args[0])" </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CompanyId</Name> <GetScriptBlock> $this.BaseObject.companies </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Company</Name> <GetScriptBlock> foreach($item in $this.BaseObject.companies) { [TANSS.Lookup]::Companies["$($item)"] } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CallBack</Name> <GetScriptBlock> $this.BaseObject.anticipatedCallbacks </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeCategory</Name> <GetScriptBlock> foreach($item in $this.BaseObject.categories) { [TANSS.Lookup]::EmployeeCategories["$($item)"] } </GetScriptBlock> </ScriptProperty> <AliasProperty> <Name>Fullname</Name> <ReferencedMemberName>Name</ReferencedMemberName> </AliasProperty> <AliasProperty> <Name>GivenName</Name> <ReferencedMemberName>Firstname</ReferencedMemberName> </AliasProperty> <AliasProperty> <Name>Surname</Name> <ReferencedMemberName>Lastname</ReferencedMemberName> </AliasProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.Employee --> <Type> <Name>Deserialized.TANSS.Employee</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.Employee </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.Employee</Name> <Members> <ScriptProperty> <Name>Name</Name> <GetScriptBlock> $this.BaseObject.name </GetScriptBlock> <SetScriptBlock> $this.BaseObject.name = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Firstname</Name> <GetScriptBlock> $this.BaseObject.firstName </GetScriptBlock> <SetScriptBlock> $this.BaseObject.firstName = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Lastname</Name> <GetScriptBlock> $this.BaseObject.lastName </GetScriptBlock> <SetScriptBlock> $this.BaseObject.lastName = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>SalutationId</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.salutationId ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.salutationId = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DepartmentId</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.departmentId ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.departmentId = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Department</Name> <GetScriptBlock> [TANSS.Lookup]::Departments["$($this.BaseObject.departmentId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Room</Name> <GetScriptBlock> $this.BaseObject.room </GetScriptBlock> <SetScriptBlock> $this.BaseObject.room = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmailAddress</Name> <GetScriptBlock> $this.BaseObject.emailAddress </GetScriptBlock> <SetScriptBlock> $this.BaseObject.emailAddress = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CarId</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.carId ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.carId = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CarPlate</Name> <GetScriptBlock> [TANSS.Lookup]::CarNumberplate["$($this.BaseObject.carId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Phone</Name> <GetScriptBlock> $this.BaseObject.telephoneNumber </GetScriptBlock> <SetScriptBlock> $this.BaseObject.telephoneNumber = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Phone2</Name> <GetScriptBlock> $this.BaseObject.telephoneNumberTwo </GetScriptBlock> <SetScriptBlock> $this.BaseObject.telephoneNumberTwo = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Mobile</Name> <GetScriptBlock> $this.BaseObject.mobilePhone </GetScriptBlock> <SetScriptBlock> $this.BaseObject.mobilePhone = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Mobile2</Name> <GetScriptBlock> $this.BaseObject.mobileNumberTwo </GetScriptBlock> <SetScriptBlock> $this.BaseObject.mobileNumberTwo = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>PersonalFAX</Name> <GetScriptBlock> $this.BaseObject.personalFaxNumber </GetScriptBlock> <SetScriptBlock> $this.BaseObject.personalFaxNumber = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>PrivatePhone</Name> <GetScriptBlock> $this.BaseObject.privatePhoneNumber </GetScriptBlock> <SetScriptBlock> $this.BaseObject.privatePhoneNumber = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Initials</Name> <GetScriptBlock> $this.BaseObject.initials </GetScriptBlock> <SetScriptBlock> $this.BaseObject.initials = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>WorkingHourModelId</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.workingHourModelId ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.workingHourModelId = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>AccountingTypeId</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.accountingTypeId ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.accountingTypeId = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsActive</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.active ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.active = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Remark</Name> <GetScriptBlock> $this.BaseObject.remark </GetScriptBlock> <SetScriptBlock> $this.BaseObject.remark = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Role</Name> <GetScriptBlock> $this.BaseObject.role </GetScriptBlock> <SetScriptBlock> $this.BaseObject.role = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>TitleId</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.titleId ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.titleId = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Language</Name> <GetScriptBlock> $this.BaseObject.language </GetScriptBlock> <SetScriptBlock> $this.BaseObject.language = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Birthday</Name> <GetScriptBlock> $this.BaseObject.birthday </GetScriptBlock> <SetScriptBlock> $this.BaseObject.birthday = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CompanyAssignment</Name> <GetScriptBlock> $this.BaseObject.companyAssignments </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CompanyId</Name> <GetScriptBlock> $this.BaseObject.companyAssignments.companyId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Company</Name> <GetScriptBlock> foreach($item in $this.BaseObject.companyAssignments.companyId) { [TANSS.Lookup]::Companies["$($item)"] } </GetScriptBlock> </ScriptProperty> <AliasProperty> <Name>Fullname</Name> <ReferencedMemberName>Name</ReferencedMemberName> </AliasProperty> <AliasProperty> <Name>GivenName</Name> <ReferencedMemberName>Firstname</ReferencedMemberName> </AliasProperty> <AliasProperty> <Name>Surname</Name> <ReferencedMemberName>Lastname</ReferencedMemberName> </AliasProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.Vacation.AbsenceSubType --> <Type> <Name>Deserialized.TANSS.Vacation.AbsenceSubType</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.Vacation.AbsenceSubType </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.Vacation.AbsenceSubType</Name> <Members> <ScriptProperty> <Name>Name</Name> <GetScriptBlock> $this.BaseObject.name </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsCharged</Name> <GetScriptBlock> $this.BaseObject.charged </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.Vacation.Request --> <Type> <Name>Deserialized.TANSS.Vacation.Request</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.Vacation.Request </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.Vacation.Request</Name> <Members> <ScriptProperty> <Name>Type</Name> <GetScriptBlock> switch ($this.BaseObject.planningType) { "VACATION" { "Vacation" } "ILLNESS" { "Illness" } "ABSENCE" { "Absence" } "STAND_BY" { "Standby" } "OVERTIME" { "Overtime" } Default { $this.BaseObject.planningType.ToUpper()[0] + $this.BaseObject.planningType.ToLower().TrimStart( $this.BaseObject.planningType.ToLower()[0] ) } } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>TypeName</Name> <GetScriptBlock> [TANSS.Lookup]::VacationTypesPredefinedApi[$this.BaseObject.planningType] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Status</Name> <GetScriptBlock> $this.BaseObject.Status </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>StartDate</Name> <GetScriptBlock> [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.startDate).ToLocalTime() </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EndDate</Name> <GetScriptBlock> [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.endDate).ToLocalTime() </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeId</Name> <GetScriptBlock> $this.BaseObject.requesterId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.requesterId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Description</Name> <GetScriptBlock> $this.BaseObject.requestReason </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Date</Name> <GetScriptBlock> [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.requestDate).ToLocalTime() </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>SupervisorId</Name> <GetScriptBlock> $this.BaseObject.supervisorId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>SupervisorName</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.supervisorId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>SupervisorComment</Name> <GetScriptBlock> $this.BaseObject.supervisorReason </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>SupervisorDate</Name> <GetScriptBlock> if($this.BaseObject.supervisorDate -eq 0) { $null } else { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.supervisorDate).ToLocalTime() } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>AbsenceSubTypeId</Name> <GetScriptBlock> $this.BaseObject.planningAdditionalId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>AbsenceSubType</Name> <GetScriptBlock> [TANSS.Lookup]::VacationAbsenceSubTypes[([int]$this.BaseObject.planningAdditionalId)] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ProcessId</Name> <GetScriptBlock> $this.BaseObject.processId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ProcessStepId</Name> <GetScriptBlock> $this.BaseObject.ProcessStepId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>TaskSeriesId</Name> <GetScriptBlock> $this.BaseObject.taskSeriesId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>RecurrenceRuleId</Name> <GetScriptBlock> $this.BaseObject.RecurrenceRuleId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Days</Name> <GetScriptBlock> foreach ($day in $this.BaseObject.days) { [TANSS.Vacation.Day]@{ BaseObject = [TANSS.Vacation.DayBaseObject]$day } } </GetScriptBlock> <SetScriptBlock> $collection = foreach ($day in ($args | Sort-Object Date)) { $day.BaseObject } $this.BaseObject.days = $collection $this.BaseObject.startDate = Get-Date -UFormat %s -Date ($this.days | Sort-Object Date)[0].Date.ToUniversalTime() $this.BaseObject.endDate = Get-Date -UFormat %s -Date ($this.days | Sort-Object Date)[-1].Date.ToUniversalTime() </SetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.Vacation.Entitlement --> <Type> <Name>Deserialized.TANSS.Vacation.Entitlement</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.Vacation.Entitlement </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.Vacation.Entitlement</Name> <Members> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> $this.BaseObject.employee.name </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeIsActive</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.employee.active ) </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TicketDocument --> <Type> <Name>Deserialized.TANSS.TicketDocument</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TicketDocument </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TicketDocument</Name> <Members> <ScriptProperty> <Name>TicketId</Name> <GetScriptBlock> $this.BaseObject.ticketId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>FileName</Name> <GetScriptBlock> $this.BaseObject.fileName </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>MimeType</Name> <GetScriptBlock> $this.BaseObject.mimeType </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeId</Name> <GetScriptBlock> $this.BaseObject.employeeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.employeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Date</Name> <GetScriptBlock> [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.date).ToLocalTime() </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsInternal</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.internal ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Description</Name> <GetScriptBlock> $this.BaseObject.description </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TicketImage --> <Type> <Name>Deserialized.TANSS.TicketImage</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TicketImage </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TicketImage</Name> <Members> <ScriptProperty> <Name>TicketId</Name> <GetScriptBlock> $this.BaseObject.ticketId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>FileName</Name> <GetScriptBlock> $this.BaseObject.fileName </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Date</Name> <GetScriptBlock> [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.date).ToLocalTime() </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeId</Name> <GetScriptBlock> $this.BaseObject.employeeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.employeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsInternal</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.internal ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Description</Name> <GetScriptBlock> $this.BaseObject.description </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ImageData</Name> <GetScriptBlock> [System.Convert]::FromBase64String($this.BaseObject.image) </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TicketComment --> <Type> <Name>Deserialized.TANSS.TicketComment</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TicketComment </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TicketComment</Name> <Members> <ScriptProperty> <Name>Date</Name> <GetScriptBlock> [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.date).ToLocalTime() </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeId</Name> <GetScriptBlock> $this.BaseObject.employeeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.employeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CategoryId</Name> <GetScriptBlock> $this.BaseObject.categoryId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Title</Name> <GetScriptBlock> $this.BaseObject.title </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Description</Name> <GetScriptBlock> $this.BaseObject.content </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsInternal</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.internal ) </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TicketActivity --> <Type> <Name>Deserialized.TANSS.TicketActivity</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TicketActivity </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TicketActivity</Name> <Members> <ScriptProperty> <Name>LinkTypeId</Name> <GetScriptBlock> $this.BaseObject.linkTypeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>LinkType</Name> <GetScriptBlock> [TANSS.Lookup]::LinkTypes["$($this.BaseObject.linkTypeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>LinkId</Name> <GetScriptBlock> $this.BaseObject.linkId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CompanyId</Name> <GetScriptBlock> $this.BaseObject.companyId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CompanyName</Name> <GetScriptBlock> [TANSS.Lookup]::Companies["$($this.BaseObject.companyId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeId</Name> <GetScriptBlock> $this.BaseObject.employeeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.employeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>TypeId</Name> <GetScriptBlock> $this.BaseObject.typeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Date</Name> <GetScriptBlock> [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.date).ToLocalTime() </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Duration</Name> <GetScriptBlock> [timespan]::new(0, $this.BaseObject.duration, 0) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Text</Name> <GetScriptBlock> $this.BaseObject.text </GetScriptBlock> </ScriptProperty> <AliasProperty> <Name>Description</Name> <ReferencedMemberName>Text</ReferencedMemberName> </AliasProperty> <ScriptProperty> <Name>IsBooked</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.booked ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ERPNumber</Name> <GetScriptBlock> $this.BaseObject.erpNumber </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsInternal</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.internal ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Location</Name> <GetScriptBlock> $this.BaseObject.location </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DurationApproach</Name> <GetScriptBlock> $this.BaseObject.durationApproach </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>KMApproach</Name> <GetScriptBlock> $this.BaseObject.kmApproach </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DurationDeparture</Name> <GetScriptBlock> $this.BaseObject.durationDeparture </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>KMDeparture</Name> <GetScriptBlock> $this.BaseObject.kmDeparture </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>TicketId</Name> <GetScriptBlock> $this.BaseObject.ticketId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ReasonNotChargedId</Name> <GetScriptBlock> $this.BaseObject.reasonNotChargedId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsInstallationFee</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.installationFee ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>InstallationFeeTypeId</Name> <GetScriptBlock> $this.BaseObject.installationFeeTypeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CarId</Name> <GetScriptBlock> $this.BaseObject.carId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CarPlate</Name> <GetScriptBlock> [TANSS.Lookup]::CarNumberplate["$($this.BaseObject.carId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ClearanceStatus</Name> <GetScriptBlock> $this.BaseObject.clearanceStatus </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>AccountingTypeId</Name> <GetScriptBlock> $this.BaseObject.accountingTypeId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>SupportIconType</Name> <GetScriptBlock> $this.BaseObject.supportIconType </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>VoucherId</Name> <GetScriptBlock> $this.BaseObject.voucherId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>PriceHour</Name> <GetScriptBlock> $this.BaseObject.hourlyRate </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ContractId</Name> <GetScriptBlock> $this.BaseObject.contractId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsExtern</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.extern ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>PlanningType</Name> <GetScriptBlock> $this.BaseObject.planningType </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>TextIntern</Name> <GetScriptBlock> $this.BaseObject.textIntern </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>BreakStart</Name> <GetScriptBlock> $this.BaseObject.startBreak </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DurationBreak</Name> <GetScriptBlock> $this.BaseObject.durationBreak </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CreatorId</Name> <GetScriptBlock> $this.BaseObject.durationBreak </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CreatorName</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.createdEmployeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>InstallationFeeAmount</Name> <GetScriptBlock> $this.BaseObject.installationFeeAmount </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>VacationRequestId</Name> <GetScriptBlock> $this.BaseObject.vacationRequestId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CostCenterId</Name> <GetScriptBlock> $this.BaseObject.costCenterId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ExternalTicketId</Name> <GetScriptBlock> $this.BaseObject.externalTicketId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Export</Name> <GetScriptBlock> $this.BaseObject.export </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DepartmentId</Name> <GetScriptBlock> $this.BaseObject.departmentId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Department</Name> <GetScriptBlock> [TANSS.Lookup]::Departments["$($this.BaseObject.departmentId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsOutlook</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.outlook ) </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TicketMail --> <Type> <Name>Deserialized.TANSS.TicketMail</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TicketMail </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TicketMail</Name> <Members> <ScriptProperty> <Name>Date</Name> <GetScriptBlock> [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.receivers[0].sentDate).ToLocalTime() </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeId</Name> <GetScriptBlock> $this.BaseObject.senderId </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.senderId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Attachments</Name> <GetScriptBlock> $this.BaseObject.attachments </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>BodyHtml</Name> <GetScriptBlock> $this.BaseObject.bodyHtml </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>BodyPlain</Name> <GetScriptBlock> $this.BaseObject.bodyPlain </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Headers</Name> <GetScriptBlock> $this.BaseObject.headers </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsInternal</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.internal ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsInbound</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.inbound ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>OriginalText</Name> <GetScriptBlock> $this.BaseObject.originalText </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsPlainTextOnly</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.plainTextOnly ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Receivers</Name> <GetScriptBlock> [string]::Join(", ", ($this.BaseObject.receivers | Select-Object -Property @{n="Receiver";e={ "$($_.method):$($_.emailAddress)" }} | Select-Object -ExpandProperty Receiver)) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>SenderName</Name> <GetScriptBlock> $this.BaseObject.senderName </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>SenderEmail</Name> <GetScriptBlock> $this.BaseObject.senderEMail </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Subject</Name> <GetScriptBlock> $this.BaseObject.subject </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TicketContent --> <Type> <Name>Deserialized.TANSS.TicketContent</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TicketContent </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TicketContent</Name> <Members> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> $this.Object.EmployeeName </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.Department --> <Type> <Name>Deserialized.TANSS.Department</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.Department </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.Department</Name> <Members> <ScriptProperty> <Name>Name</Name> <GetScriptBlock> $this.BaseObject.name </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsInternal</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.internal ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsLockedForCustomer</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.customer ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>MentionProject</Name> <GetScriptBlock> $this.BaseObject.mentionProject </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeId</Name> <GetScriptBlock> $this.BaseObject.employeeIds </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> foreach($item in $this.BaseObject.employeeIds) { [TANSS.Lookup]::Employees["$($item)"] } </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TicketStatus --> <Type> <Name>Deserialized.TANSS.TicketStatus</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TicketStatus </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TicketStatus</Name> <Members> <ScriptProperty> <Name>Name</Name> <GetScriptBlock> $this.BaseObject.name </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Image</Name> <GetScriptBlock> $this.BaseObject.image </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>WaitState</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.waitState ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>WaitDays</Name> <GetScriptBlock> $this.BaseObject.waitDays </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Rank</Name> <GetScriptBlock> $this.BaseObject.rank </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>RequireReactionFromCustomer</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.requireReactionFromCustomer ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsActive</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.active ) </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TicketType --> <Type> <Name>Deserialized.TANSS.TicketType</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TicketType </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TicketType</Name> <Members> <ScriptProperty> <Name>Name</Name> <GetScriptBlock> $this.BaseObject.name </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>UseReactionHours</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.useReactionHours ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>IsActive</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.active ) </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.ProjectPhase --> <Type> <Name>Deserialized.TANSS.ProjectPhase</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.ProjectPhase </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.ProjectPhase</Name> <Members> <ScriptProperty> <Name>ProjectId</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.projectId ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Project</Name> <GetScriptBlock> [TANSS.Lookup]::Tickets["$($this.BaseObject.projectId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Rank</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.rank ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.rank = [int]$args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Name</Name> <GetScriptBlock> $this.BaseObject.name </GetScriptBlock> <SetScriptBlock> $this.BaseObject.name = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>StartDate</Name> <GetScriptBlock> if($this.BaseObject.startDate -eq 0){ $null } else { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.startDate).ToLocalTime() } </GetScriptBlock> <SetScriptBlock> $this.BaseObject.startDate = Get-Date -UFormat %s -Date $args[0].Date.ToUniversalTime() </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EndDate</Name> <GetScriptBlock> if($this.BaseObject.endDate -eq 0){ $null } else { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.endDate).ToLocalTime() } </GetScriptBlock> <SetScriptBlock> $this.BaseObject.endDate = Get-Date -UFormat %s -Date $args[0].Date.ToUniversalTime() </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ClosedPrePhasesRequired</Name> <GetScriptBlock> [bool]::Parse( $this.BaseObject.closedPrePhasesRequired ) </GetScriptBlock> <SetScriptBlock> $this.BaseObject.closedPrePhasesRequired = $args[0] </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>BillingType</Name> <GetScriptBlock> switch ($this.BaseObject.billingType) { "DEFAULT" { "InstantBillSupportActivities" } "TICKET_MUST_BE_CLOSED" { "BillClosedTicketOnly" } "ALL_TICKETS_MUST_BE_CLOSED" { "BillOnlyWhenAllTicketsClosed" } Default { $this.BaseObject.billingType } } </GetScriptBlock> <SetScriptBlock> switch ($args[0]) { "InstantBillSupportActivities" { $this.BaseObject.billingType = "DEFAULT" } "BillClosedTicketOnly" { $this.BaseObject.billingType = "TICKET_MUST_BE_CLOSED" } "BillOnlyWhenAllTicketsClosed" { $this.BaseObject.billingType = "ALL_TICKETS_MUST_BE_CLOSED" } Default { Write-Error "Unhandeled value in BillingType. $($args[0]) is not supported" } } </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>ClearanceMode</Name> <GetScriptBlock> switch ($this.BaseObject.clearanceMode) { "DEFAULT" { "Default" } "DONT_CLEAR_SUPPORTS" { "ReleaseSupportOfUnresolvedTickets" } "MAY_CLEAR_SUPPORTS" { "LockSupportsOfUnresolvedTickets" } Default { $this.BaseObject.clearanceMode } } </GetScriptBlock> <SetScriptBlock> switch ($args[0]) { "Default" { $this.BaseObject.clearanceMode = "DEFAULT" } "ReleaseSupportOfUnresolvedTickets" { $this.BaseObject.clearanceMode = "DONT_CLEAR_SUPPORTS" } "LockSupportsOfUnresolvedTickets" { $this.BaseObject.clearanceMode = "MAY_CLEAR_SUPPORTS" } Default { Write-Error "Unhandeled value in ClearanceMode. $($args[0]) is not supported" } } </SetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> <!-- TANSS.TimeStamp --> <Type> <Name>Deserialized.TANSS.TimeStamp</Name> <Members> <MemberSet> <Name>PSStandardMembers</Name> <Members> <NoteProperty> <Name> TargetTypeForDeserialization </Name> <Value> TANSS.TimeStamp </Value> </NoteProperty> </Members> </MemberSet> </Members> </Type> <Type> <Name>TANSS.TimeStamp</Name> <Members> <ScriptProperty> <Name>EmployeeId</Name> <GetScriptBlock> [int]::Parse( $this.BaseObject.employeeId ) </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>EmployeeName</Name> <GetScriptBlock> [TANSS.Lookup]::Employees["$($this.BaseObject.employeeId)"] </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Date</Name> <GetScriptBlock> if($this.BaseObject.date -eq 0){ $null } else { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.date).ToLocalTime() } </GetScriptBlock> <SetScriptBlock> $this.BaseObject.date = Get-Date -UFormat %s -Date $args[0].ToUniversalTime() </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>DayOfWeek</Name> <GetScriptBlock> $this.Date.DayOfWeek </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>State</Name> <GetScriptBlock> switch ($this.BaseObject.state) { "ON" { "Coming" } "OFF" { "Leaving" } "PAUSE_START" { "StartPause" } "PAUSE_END" { "EndPause" } Default {} } </GetScriptBlock> <SetScriptBlock> switch ($args[0]) { "Coming" { $this.BaseObject.state = "ON" } "Leaving" { $this.BaseObject.state = "OFF" } "StartPause" { $this.BaseObject.state = "PAUSE_START" } "EndPause" { $this.BaseObject.state = "PAUSE_END" } Default { Write-Error "$($args[0]) is not a valid state for a timestamp" } } </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>Type</Name> <GetScriptBlock> switch ($this.BaseObject.type) { "WORK" { "Work" } "INHOUSE" { "Inhouse" } "ERRAND" { "Errand" } "VACATION" { "Vacation" } "ILLNESS" { "Illness" } "ABSENCE_PAID" { "PaidAbsence" } "ABSENCE_UNPAID" { "UnpaidAbsence" } "OVERTIME" { "Overtime" } "DOCUMENTED_SUPPORT" { "Support" } Default {} } </GetScriptBlock> <SetScriptBlock> switch ($args[0]) { "Work" { $this.BaseObject.type = "WORK" } "Inhouse" { $this.BaseObject.type = "INHOUSE" } "Errand" { $this.BaseObject.type = "ERRAND" } "Vacation" { $this.BaseObject.type = "VACATION" } "Illness" { $this.BaseObject.type = "ILLNESS" } "PaidAbsence" { $this.BaseObject.type = "ABSENCE_PAID" } "UnpaidAbsence" { $this.BaseObject.type = "ABSENCE_UNPAID" } "Overtime" { $this.BaseObject.type = "OVERTIME" } "Support" { $this.BaseObject.type = "DOCUMENTED_SUPPORT" } Default { Write-Error "$($args[0]) is not a valid type for a timestamp" } } </SetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CreationDate</Name> <GetScriptBlock> if($this.BaseObject.creationDate -eq 0){ $null } else { [datetime]::new(1970, 1, 1, 0, 0, 0, 0, [DateTimeKind]::Utc).AddSeconds($this.BaseObject.creationDate).ToLocalTime() } </GetScriptBlock> </ScriptProperty> <ScriptProperty> <Name>CreationMode</Name> <GetScriptBlock> $this.BaseObject.creationMode </GetScriptBlock> </ScriptProperty> <CodeProperty IsHidden="true"> <Name>SerializationData</Name> <GetCodeReference> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> <MethodName>GetSerializationData</MethodName> </GetCodeReference> </CodeProperty> </Members> <TypeConverter> <TypeName>PSFramework.Serialization.SerializationTypeConverter</TypeName> </TypeConverter> </Type> </Types> |