ServiceBuilder
- class someipy.ServiceBuilder
Class used to build a Service using a fluent API. Call the ‘with’ methods to add methods and event groups to the service. Call the build method to create the service.
- with_eventgroup(eventgroup)
Adds an event group to the service to be built.
Parameters
- eventgroupEventGroup
The event group to be added.
Returns
ServiceBuilder
- Parameters:
eventgroup (EventGroup) –
- Return type:
- with_major_version(major_version)
Sets the major version for the service to be built.
Parameters
- major_versionint
The major version of the service.
Returns
ServiceBuilder
- Parameters:
major_version (int) –
- Return type:
- with_method(method)
Adds a method to the service to be built.
Parameters
- methodMethod
The method to be added.
Returns
ServiceBuilder
- Parameters:
method (Method) –
- Return type:
- with_minor_version(minor_version)
Sets the minor version for the service to be built.
Parameters
- minor_versionint
The minor version of the service.
Returns
ServiceBuilder
- Parameters:
minor_version (int) –
- Return type: