1 from PLC.Faults import *
2 from PLC.Method import Method
3 from PLC.Parameter import Parameter, Mixed
4 from PLC.Filter import Filter
5 from PLC.AddressTypes import AddressType, AddressTypes
6 from PLC.Auth import Auth
8 class GetAddressTypes(Method):
10 Returns an array of structs containing details about address
11 types. If address_type_filter is specified and is an array of
12 address type identifiers, or a struct of address type attributes,
13 only address types matching the filter will be returned. If
14 return_fields is specified, only the specified details will be
18 roles = ['admin', 'pi', 'user', 'tech']
22 Mixed([Mixed(AddressType.fields['address_type_id'],
23 AddressType.fields['name'])],
24 Filter(AddressType.fields)),
25 Parameter([str], "List of fields to return", nullok = True)
28 returns = [AddressType.fields]
30 def call(self, auth, address_type_filter = None, return_fields = None):
31 return AddressTypes(self.api, address_type_filter, return_fields)