'Set the transport type protocol for API.
Supports http and https transport types.'

def set_transport_type(self, transport_type):

    if (not transport_type):
        raise ValueError('No    transport    type    specified')
    if (transport_type.lower() not in (NaServer.TRANSPORT_TYPE_HTTP, NaServer.TRANSPORT_TYPE_HTTPS)):
        raise ValueError('Unsupported    transport    type')
    self._protocol = transport_type.lower()
    if (self._protocol == NaServer.TRANSPORT_TYPE_HTTP):
        if (self._server_type == NaServer.SERVER_TYPE_FILER):
            self.set_port(80)
        else:
            self.set_port(8088)
    elif (self._server_type == NaServer.SERVER_TYPE_FILER):
        self.set_port(443)
    else:
        self.set_port(8488)
    self._refresh_conn = True
