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.

build()

Builds and returns a Service.

Returns

Service

The built Service.

Return type:

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:

ServiceBuilder

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:

ServiceBuilder

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:

ServiceBuilder

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:

ServiceBuilder

with_service_id(id)

Sets the service id for the service to be built.

Parameters

idint

The ID of the service.

Returns

ServiceBuilder

Parameters:

id (int) –

Return type:

ServiceBuilder